#coding=utf-8

from sdk.mail_send import MAILSend
from sdk.app_configs import MAIL_CONFIGS
from tornado.gen import coroutine
from tornado.ioloop import IOLoop

if __name__=='__main__':
    @coroutine
    def send_test_mail():
        submail = MAILSend(MAIL_CONFIGS)
        submail.add_to('sssssinter@qq.com','leo')
        submail.set_sender('no-reply@fengniaodata.com','SUBMAIL')
        submail.set_subject('test SDK')
        submail.set_text('test SDK text')
        submail.set_html('test sdk html')
        responce = yield submail.send()
        print responce.body
    IOLoop.instance().run_sync(send_test_mail)